package cn.edu.njuit.server.ugcnote.ugcnoteserver.repository;

import cn.edu.njuit.server.ugcnote.ugcnoteserver.entity.TypeInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TypeInfoRepository extends JpaRepository<TypeInfo, Long> {
    @Query("select a from TypeInfo a order by a.typeSort")
    List<TypeInfo> findAllTypes();
}
